home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_12.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  2.4 KB  |  79 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_12 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_12()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var fuelIcon:* = undefined;
  21.          var goalObj:Object = null;
  22.          var missionObj:Object = null;
  23.          var ring:* = undefined;
  24.          var indian:* = undefined;
  25.          super.buildLevel();
  26.          for(i = 0; i < 20; i++)
  27.          {
  28.             ring = new GoalRing();
  29.             ring.x = 1000 + i * 100;
  30.             ring.y = 300 + Math.random() * 400;
  31.             ring.rOffset = Math.random() * 2 - 1;
  32.             WorldScene.Instance.GameplayObjects.push(ring);
  33.          }
  34.          for(i = 0; i < 8; i++)
  35.          {
  36.             indian = new Indian();
  37.             indian.x = 1000 + i * 200;
  38.             indian.y = 710;
  39.             WorldScene.Instance.GameplayObjects.push(indian);
  40.             WorldScene.Instance.Indians.push(indian);
  41.          }
  42.          fuelIcon = new FuelIcon();
  43.          fuelIcon.x = 1000;
  44.          fuelIcon.y = 250;
  45.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  46.          fuelIcon = new FuelIcon();
  47.          fuelIcon.x = 1000;
  48.          fuelIcon.y = 500;
  49.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  50.          fuelIcon = new FuelIcon();
  51.          fuelIcon.x = 1250;
  52.          fuelIcon.y = 250;
  53.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  54.          fuelIcon = new FuelIcon();
  55.          fuelIcon.x = 1250;
  56.          fuelIcon.y = 500;
  57.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  58.          _missionDescription = CopyBank.Instance.MissionDesc_Rings;
  59.          goalObj = {
  60.             "Type":"Ring",
  61.             "Count":20
  62.          };
  63.          _goalParameters.push(goalObj);
  64.          missionObj = {
  65.             "Description":_missionDescription,
  66.             "BoundsX":_missionBoundsX,
  67.             "BoundsHint":_missionBoundsHint,
  68.             "GoalParamaters":_goalParameters,
  69.             "PrimaryGoalType":"Rings",
  70.             "StartLoc":{
  71.                "x":500,
  72.                "y":850
  73.             }
  74.          };
  75.          WorldScene.Instance.setMissionDetails(missionObj);
  76.       }
  77.    }
  78. }
  79.